package com.czy.fx.day1.stage;

import javafx.application.Application;
import javafx.stage.Stage;
import javafx.stage.StageStyle;

/**
 * 窗口模式
 */
public class demo3 extends Application {

    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) throws Exception {
        /*默认窗口模式*/
        Stage stage1 = new Stage();
        stage1.setTitle("stage1");
        stage1.initStyle(StageStyle.DECORATED);

        /*透明背景*/
        Stage stage2 = new Stage();
        stage2.setTitle("stage2");
        stage2.initStyle(StageStyle.TRANSPARENT);

        /*和1的区别就是，没有头部样式*/
        Stage stage3 = new Stage();
        stage3.setTitle("stage3");
        stage3.initStyle(StageStyle.UNIFIED);

        /*纯白背景，没有缩小和放大，只有关闭按钮*/
        Stage stage4 = new Stage();
        stage4.setTitle("stage4");
        stage4.initStyle(StageStyle.UTILITY);

        /*和透明类似*/
        Stage stage5 = new Stage();
        stage5.setTitle("stage5");
        stage5.initStyle(StageStyle.UNDECORATED);

        stage1.show();
        stage2.show();
        stage3.show();
        stage4.show();
        stage5.show();
    }
}